package com.jiyun.listener;

import com.jiyun.mapper.MessagePondMapper;
import com.jiyun.pojo.entity.MessagePond;
import com.jiyun.pojo.entity.Order;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoShenheListener {
    @Autowired(required = false)
    private MessagePondMapper messagePondMapper;


    @RabbitListener(bindings = @QueueBinding(
            value = @Queue(value = "leyou.create.web.queue", durable = "true"),
            exchange = @Exchange(
                    value = "Pt.item.exchange",
                    ignoreDeclarationExceptions = "true",
                    type = ExchangeTypes.TOPIC),
            key = {"item.qingshenhe"}))
    public void listenCreate(Order order) throws Exception {
        if (order==null){
            return;
        }

    }
}
